<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%special}}".
 *
 * @property int $special_id
 * @property int $special_category_id
 * @property string $title
 * @property string $keyword
 * @property int $status 状态分类:1.发布，0.冻结
 * @property string $date_add
 * @property string $desc 描述
 */
class Special extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%special}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['special_category_id', 'title', 'date_add'], 'required'],
            [['special_category_id', 'status'], 'integer'],
            [['date_add'], 'safe'],
            [['title'], 'string', 'max' => 64],
            [['keyword'], 'string', 'max' => 255],
            [['desc'], 'string', 'max' => 500],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'special_id' => Yii::t('app', 'Special ID'),
            'special_category_id' => Yii::t('app', 'Special Category ID'),
            'title' => Yii::t('app', 'Title'),
            'keyword' => Yii::t('app', 'Keyword'),
            'status' => Yii::t('app', 'Status'),
            'date_add' => Yii::t('app', 'Date Add'),
            'desc' => Yii::t('app', 'Desc'),
        ];
    }
}
